#include<bits/stdc++.h>
using namespace std;
const int maxn = 200006;
int p[maxn];
int solve() {
  int n,x;cin>>n>>x;
  int ans=0;
  for(int i=0; i<n; ++i)  cin>>p[i]; 
  sort(p, p+n);
  int i=0,j=n-1;
  while(i<=j) {
    if(p[i]+p[j]>x) j--;
    else i++,j--;
    ans++;
  }
  cout<<ans<<"\n";
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": "
    solve();
  }
  return 0;
}
